'use strict';
module.exports = app => {
  class homePage extends app.Service {
    * WfwLoginCount(params) {
      let info;
      if (params.TYPE === 1) {
        info = {
          msg: '获取数据成功',
          result: [
            {
              NAME: '教师打卡',
              LOGIN_COUNT: '130',
            },
            {
              NAME: '晚签到',
              LOGIN_COUNT: '70',
            },
            {
              NAME: '网络报修',
              LOGIN_COUNT: '380',
            },
            {
              NAME: '后勤报修',
              LOGIN_COUNT: '320',
            },
            {
              NAME: '成绩查询',
              LOGIN_COUNT: '120',
            },
            {
              NAME: '奖惩查询',
              LOGIN_COUNT: '120',
            },
            {
              NAME: '天府同行',
              LOGIN_COUNT: '120',
            },
            {
              NAME: '在线注册',
              LOGIN_COUNT: '20',
            },
          ],
          status: 0,
        };
      }
      if (params.TYPE === 2) {
        info = {
          msg: '获取数据成功',
          result: [
            {
              NAME: '教师打卡',
              LOGIN_COUNT: '030',
            },
            {
              NAME: '晚签到',
              LOGIN_COUNT: '50',
            },
            {
              NAME: '网络报修',
              LOGIN_COUNT: '320',
            },
            {
              NAME: '后勤报修',
              LOGIN_COUNT: '120',
            },
            {
              NAME: '成绩查询',
              LOGIN_COUNT: '110',
            },
            {
              NAME: '奖惩查询',
              LOGIN_COUNT: '120',
            },
            {
              NAME: '天府同行',
              LOGIN_COUNT: '180',
            },
            {
              NAME: '在线注册',
              LOGIN_COUNT: '190',
            },
          ],
          status: 0,
        };
      }
      return info;
    }
  }
  return homePage;
};
